
function
Stack () {
    var stack = new Array (512);
    var top = 511;

    stack [ top ] = 0;

    this.pop = function ()
    {
        var value = stack[top];
    
        // console.log ( "pop  " + value );
        top = ( top < 511 ? ++top : 511 );
        return ( value );
    }
    this.push = function ( value )
    {
        // console.log ( "push " + value );
        stack [--top] = value;
    }
}
